package com.lwkjgf.workplace.view.viewpager;

import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;

import androidx.viewpager.widget.ViewPager;

public class NoSlideViewPager extends ViewPager {
    private static int MAX_OFF_SCREEN = 5;
    public NoSlideViewPager(Context context, AttributeSet attributeSet){
        super(context,attributeSet);
    }

    @Override
    public boolean onTouchEvent(MotionEvent ev) {
        return false;
    }

    @Override
    public void setOffscreenPageLimit(int limit) {
        super.setOffscreenPageLimit(MAX_OFF_SCREEN);
    }
}
